if(redis.call('zcard',KEYS[1])~=0) then
    local a = redis.call('zRevRange',KEYS[1],0,0,'withScores')
    return cjson.encode(redis.call('zRangeByScore',KEYS[1],KEYS[2],a[2]))
else
    return cjson.encode(nil)
end